﻿#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "desk.h"
#include "log4z.h"
#include "share_data.h"
#include <QtWidgets/QApplication>
#include "mqtt_handler.h"
#include <thread>
#include "msg_type.h"
#include <QDir>
using namespace msgType;
using namespace zsummer::log4z;


int main(int argc, char *argv[]){
    QApplication a(argc,argv);
	QApplication::setWindowIcon(QIcon("icon/shake_motor.png"));
	//设置样式
	if (QFile::exists("config/style.qss"))
	{
		QFile style("config/style.qss");
		if (style.open(QIODevice::ReadOnly)) a.setStyleSheet(style.readAll());
	}
    ILog4zManager::getRef().start();
    GET_MQTT_HANDLE.Start();
    desk w;
	w.setWindowIcon(QIcon("icon/shake_motor.png"));
	w.show();
    return a.exec();
}